﻿@* Ui层项目 - 应用数据配置文件 *@
@using Util.Generators.Helpers
@model Util.Generators.Contexts.EntityContext
@{
    var service = new GenerateService( Model );
    Model.Output.FileNameNoExtension = "app-data";
    Model.Output.Extension = ".json";
    Model.Output.RelativeRootPath = $"{service.GetClientRootPath()}/src/assets";
}
{
  "app": {
    "name": "Util管理后台",
    "description": "Util管理后台"
  },
  "user": {
    "name": "util",
    "avatar": "./assets/tmp/img/avatar.jpg",
    "email": "xiadao521@qq.com"
  },
  "menu": [
    {
      "text": "主导航",
      "i18n": "menu.main",
      "group": false,
      "hideInBreadcrumb": true,
      "children": [
        {
          "text": "仪表盘",
          "i18n": "menu.dashboard",
          "icon": "anticon-dashboard",
          "children": [          
            {
              "text": "监控页",
              "link": "/dashboard/monitor",
              "i18n": "menu.dashboard.monitor"
            }
          ]
        },   
        {
          "text": "@service.GetClientAppName()",
          "children": [
          @for ( var i = 0; i < service.GetEntities().Count; i++ ) {
            var entity = service.GetEntities()[i];
            @:{
              @:"text": "@entity.Description",
              @:"link": "/@service.GetClientModuleRoutePath()/@service.GetClientEntityFileName( entity )",
              @:"i18n": "@service.GetEntityI18nKey( entity )",
              @:"reuse": true
            @:}@if ( i < service.GetEntities().Count - 1 ) {<text>,</text>}
}         ]
        }
      ]
    }
  ]
}